/**
 * Stack.java
 * Fecha: 28 de julio de 2011
 * Autor: Juan Fernando Medrano Yax, 10330
 * Descripcion: Esta interfaz define a un stack LIFO.
 */

/**
 * @author Medrano
 *
 */
public interface Stack<E> {
	
	/**
	 * Adds an item to the top of the Stack
	 * @param item  The new item to be added to the top of the stack
	 */
	public void push(E item);
	//pre: none
	//post: item E is added to the stack
	
	/**
	 * Returns the item in the top of the stack and removes it from the stack
	 */
	public E pop();
	//pre: the stack is not empty
	//post: the item in the top of the stack is removed and returned
	
	/**
	 * Returns the size of the stack. The size is always an integer.
	 */
	public int size();
	//pre: none
	//post: returns the number of items in the stack
	
	/**
	 * Returns true only if the stack is empty (the is no item).
	 */
	public boolean isEmpty();
	//pre: none
	//post: returns true only if the stack is empty
	
	/**
	 * Returns the item in the top of the stack but does not removes it from the stack
	 */
	public E peek();
	//pre: the stack is not empty
	//post: the item in the top of the stack is returned
	
	/**
	 *  Returns a string description of the class that implements this interface
	 */
	public String toString();

}
